package com.bitoon.basketdudes.web.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Alberto Piquer
 */
@Embeddable
public class AdmRolSeccionPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "adm_role_id")
    private int admRoleId;
    @Basic(optional = false)
    @Column(name = "adem_section_id")
    private int ademSectionId;

    public AdmRolSeccionPK() {
    }

    public AdmRolSeccionPK(int admRoleId, int ademSectionId) {
        this.admRoleId = admRoleId;
        this.ademSectionId = ademSectionId;
    }

    public int getAdmRoleId() {
        return admRoleId;
    }

    public void setAdmRoleId(int admRoleId) {
        this.admRoleId = admRoleId;
    }

    public int getAdemSectionId() {
        return ademSectionId;
    }

    public void setAdemSectionId(int ademSectionId) {
        this.ademSectionId = ademSectionId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) admRoleId;
        hash += (int) ademSectionId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AdmRolSeccionPK)) {
            return false;
        }
        AdmRolSeccionPK other = (AdmRolSeccionPK) object;
        if (this.admRoleId != other.admRoleId) {
            return false;
        }
        if (this.ademSectionId != other.ademSectionId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bitoon.basketdudes.jpa.AdmRolSeccionPK[admRoleId=" + admRoleId + ", ademSectionId=" + ademSectionId + "]";
    }

}
